package Fileinputstream;

import java.io.FileInputStream;
import java.io.IOException;

public class fileinputstreamTest02 {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("F:\\javacode\\temp");
            byte[] bytes = new byte[4];
            int count = 0;
            while((count=fis.read(bytes))!=-1){
                System.out.print(new String(bytes,0,count));
            }

        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if(fis!=null){
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
